Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

330
Visualizações
How to get "Failed to fetch" reason?

Some of my users are encountering a "Failed to fetch" issue on certain fetch requests. I'm trying to figure out why. It's fetching from the same domain, so it shouldn't be a CORS issue.

Is there any way I can get more info? e.g. in Chrome, when I intentionally block the URL, it tells me blocked:devtools. Can I get similar info out of the error object in a .catch block? e.g. bad headers, CORS rejection, lost internet, whatever?

To be clear, I want to get this info programmatically. My users are experiencing this issue, not me. I'll send the data to my error catcher to debug further.

enter image description here


PerformanceObserver does not seem to report on requests that have failed:

(async () => {
    const o = new PerformanceObserver((list, observer) => {
        console.log('observation!')
        console.log(list.getEntries())
    })
    o.observe({entryTypes:['resource']})
    fetch('/fail').then(console.info,console.error)
    o.disconnect()
})()
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda